﻿#ifndef PST_DIALOGTOTALQUANTITYCALCULATION_H
#define PST_DIALOGTOTALQUANTITYCALCULATION_H

#include <IdaDialogFrame>
#include <QModelIndexList>
QT_BEGIN_NAMESPACE
namespace Ui
{
    class DialogTotalQuantityCalculation;
};
QT_END_NAMESPACE

namespace pst
{
    class DataChosenListDialog;
    class DialogTotalQuantityCalculation : public IdaDialogFrame
    {
        Q_OBJECT

    public:
        DialogTotalQuantityCalculation(QWidget* parent = nullptr);
        ~DialogTotalQuantityCalculation();
        void setCurveNameList(const QList<QString>& curveNameList);

    public slots:
        void on_pushButton_confirm_clicked();
        void on_pushButton_cancel_clicked();
        void slot_sentChosenDataIds(const QModelIndexList& chosenID);
        /// @brief 选择Ex分量相关曲线按钮点击
        void slot_selectDataButtonExClicked();
        /// @brief 选择Ey分量相关曲线
        void slot_selectDataButtonEyClicked();
        /// @brief 选择Ez分量相关曲线
        void slot_selectDataButtonEzClicked();

    signals:
        void signal_totalCalculation(const QStringList& xNameList, const QStringList& yNameList, const QStringList& zNameList);

    private:
        void openDataChosenListDialog(); // 打开数据选择框进行数据选择

    private:
        Ui::DialogTotalQuantityCalculation* ui;
        DataChosenListDialog* m_dataChosenListDialog;
        QList<QString> m_curveNameList;
        QList<int> m_selectedIndexs;
        bool m_isExPushButtonClicked{false};
        bool m_isEyPushButtonClicked{false};
        bool m_isEzPushButtonClicked{false};
    };
} // namespace pst

#endif
